/*
 *@Description: 字典接口控制器
 *@Author: panlua
 *@Date: 2019-05-22 16:19:21
*/

const Router = require('koa-router')
// 导入Dic模型
const {Dic} = require('../model/index')

const router = new Router({
  prefix: '/dic'
})

router.get('/queryDicData', async(ctx) => {
  try {
    success.returnObj = await Dic.find({'status': true}, {'_id': 0, '__v': 0})
    ctx.body = success
  } catch (err) {
    fail.msgContent = '服务器异常'
    ctx.body = fail
  }
})

module.exports = router